package com.kc.road.camera.util;

import java.util.Map;
import java.util.UUID;

public class UuidUtils {
	
	/**
	 * 生成UUID，删除-
	 * 37703f9a839d44f5803830339bdf3b5a
	 * @return String
	 */
	public static String getUuid(){
		return UUID.randomUUID().toString().replace("-", "");
	}

	/**
	 * 2017/07/11/23/37703f9a839d44f5803830339bdf3b5a
	 * @return String
	 */
	public static String getDateUuid(){
		return DateUtil.getDateHour()+"/"+getUuid();
	}


	public static String getMapKeyUuid(Map<String,String> map){
		String key = null;
		for (Map.Entry<String, String> entry : map.entrySet()) {
			key = entry.getKey();
		}
		return key;
	}

	public static void main(String[] args){
		System.out.println(getDateUuid());


	}

}
